package cn.iocoder.yudao.module.of.controller.admin.documentinfo.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import javax.validation.constraints.*;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 公文信息新增/修改 Request VO")
@Data
public class DocumentInfoSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "3558")
    private Long id;

    @Schema(description = "送文单位ID", example = "21903")
    private Long sendDocDeptId;

    @Schema(description = "送文单位名称", example = "芋艿")
    private String sendDocDeptName;

    @Schema(description = "收文日期")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate receiptDocDate;

    @Schema(description = "公文编号")
    private String docCode;

    @Schema(description = "公文名称", example = "李四")
    private String docName;

    @Schema(description = "收件人ID", example = "28245")
    private Long receiptUserId;

    @Schema(description = "收入人姓名", example = "张三")
    private String receiptUserName;

    @Schema(description = "经办人ID", example = "24672")
    private Long handleUserId;

    @Schema(description = "经办人姓名", example = "芋艿")
    private String handleUserName;

    @Schema(description = "附件")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Set<Long> attachs;

    @Schema(description = "主办部门ID", example = "16074")
    private Long mainRespDeptId;

    @Schema(description = "主办部门名称", example = "赵六")
    private String mainRespDeptName;


    @Schema(description = "生成任务人", example = "1716")
    private Long taskGenUserId;

    @Schema(description = "生成任务人", example = "张三")
    private String taskGenUserName;

}